home *** CD-ROM | disk | FTP | other *** search
- #define DEBUG 0
- /*
- TOWNS囲碁棋譜記録プログラム
- 1993/03/01 久保田俊也
-
- 92/03/01 commentデ-タを操作する関数の集まり
- 現在のバ-ジョンはMAX_TE_NUMBER以上のデ-タを要求すると
- NULLを返す
-
-
- */
- #include <stdlib.h>
- #include <string.h>
- #include "igo.h"
-
- static char comment[MAX_TE_NUMBER][256];
- static int current_comment_no;
-
- int comment_init()
- {
- int i;
-
- for(i=0;i<MAX_TE_NUMBER;i++){
- comment[i][0] = '\0';
- }
- current_comment_no = 0;
-
- return 0;
-
- }
-
- int comment_set(char *text)
- {
-
- if(strlen(text)>255){
- return -1;
- }
- current_comment_no++;
- strcpy( comment[current_comment_no] , text);
- return current_comment_no;
-
- }
-
- char *comment_read(int comment_no)
- {
-
- if(current_comment_no < comment_no){
- return NULL;
- }
- return comment[comment_no];
-
- }
-
-